﻿#pragma once
# include "d3d9.h"
# include "d3dx9.h"
# include <vector>
// # include "dcomp.h"
#include "../Constants/windowConstants.h"


class GraphicsWithDx9
{
public:
    GraphicsWithDx9(HWND hwnd);
    GraphicsWithDx9(const GraphicsWithDx9& other) = delete;
    GraphicsWithDx9& operator=(const GraphicsWithDx9& other) = delete;
    ~GraphicsWithDx9();
    void doFrame() const;
    void putSlot(char* text, int index) const;
private:

    IDirect3D9* _pD3D = nullptr;
    IDirect3DDevice9* _pDevice = nullptr;
    ID3DXFont* _pFont = nullptr;
    int _viewWidth = 0;
    int _viewHeight = 0;
    RECT* _viewRect = nullptr;
    std::vector<char*> * _slots = nullptr;
    int _slotsNum = 0;

    void drawSlots() const;
};
